package com.example.xt.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.xt.entity.Medicine;
import com.example.xt.mapper.MedicineMapper;
import com.example.xt.service.IMedicineService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.sql.Date;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2022-02-27
 */
@Service
public class MedicineServiceImpl extends ServiceImpl<MedicineMapper, Medicine> implements IMedicineService {
    @Resource
    MedicineMapper medicineMapper;


    @Override
    public boolean OrUpdate(Integer stock, Object id) {
        return medicineMapper.orupdata(stock, id);
    }

    @Override
    public Integer addstock(String name, Integer costprice, Integer price, Integer ep, Date ex, Integer stock, String clas, String region) {
        return medicineMapper.addstock(name, costprice, price, ep, ex, stock, clas, region);
    }

    @Override
    public Integer or(String name, Integer costprice, Integer price, Integer ep, Date ex) {
        return medicineMapper.or(name, costprice, price, ep, ex);
    }

    @Override
    public void exp() {

    }
}
